Optimal. Leaf size=45 \[ \frac {a x}{a^2+b^2}+\frac {b \log (a \cos (c+d x)+b \sin (c+d x))}{\left (a^2+b^2\right ) d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 45, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3565, 3611}
\begin {gather*} \frac {b \log (a \cos (c+d x)+b \sin (c+d x))}{d \left (a^2+b^2\right )}+\frac {a x}{a^2+b^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3565
Rule 3611
Rubi steps
\begin {align*} \int \frac {1}{a+b \tan (c+d x)} \, dx &=\frac {a x}{a^2+b^2}+\frac {b \int \frac {b-a \tan (c+d x)}{a+b \tan (c+d x)} \, dx}{a^2+b^2}\\ &=\frac {a x}{a^2+b^2}+\frac {b \log (a \cos (c+d x)+b \sin (c+d x))}{\left (a^2+b^2\right ) d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.06, size = 76, normalized size = 1.69 \begin {gather*} \frac {(-i a-b) \log (i-\tan (c+d x))+i (a+i b) \log (i+\tan (c+d x))+2 b \log (a+b \tan (c+d x))}{2 \left (a^2+b^2\right ) d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.09, size = 62, normalized size = 1.38
method | result | size |
derivativedivides | \(\frac {\frac {-\frac {b \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2}+a \arctan \left (\tan \left (d x +c \right )\right )}{a^{2}+b^{2}}+\frac {b \ln \left (a +b \tan \left (d x +c \right )\right )}{a^{2}+b^{2}}}{d}\) | \(62\) |
default | \(\frac {\frac {-\frac {b \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2}+a \arctan \left (\tan \left (d x +c \right )\right )}{a^{2}+b^{2}}+\frac {b \ln \left (a +b \tan \left (d x +c \right )\right )}{a^{2}+b^{2}}}{d}\) | \(62\) |
norman | \(\frac {a x}{a^{2}+b^{2}}+\frac {b \ln \left (a +b \tan \left (d x +c \right )\right )}{d \left (a^{2}+b^{2}\right )}-\frac {b \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2 d \left (a^{2}+b^{2}\right )}\) | \(65\) |
risch | \(-\frac {x}{i b -a}-\frac {2 i b x}{a^{2}+b^{2}}-\frac {2 i b c}{d \left (a^{2}+b^{2}\right )}+\frac {b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {i b +a}{i b -a}\right )}{d \left (a^{2}+b^{2}\right )}\) | \(89\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.52, size = 69, normalized size = 1.53 \begin {gather*} \frac {\frac {2 \, {\left (d x + c\right )} a}{a^{2} + b^{2}} + \frac {2 \, b \log \left (b \tan \left (d x + c\right ) + a\right )}{a^{2} + b^{2}} - \frac {b \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{a^{2} + b^{2}}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.27, size = 62, normalized size = 1.38 \begin {gather*} \frac {2 \, a d x + b \log \left (\frac {b^{2} \tan \left (d x + c\right )^{2} + 2 \, a b \tan \left (d x + c\right ) + a^{2}}{\tan \left (d x + c\right )^{2} + 1}\right )}{2 \, {\left (a^{2} + b^{2}\right )} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [C] Result contains complex when optimal does not.
time = 0.41, size = 241, normalized size = 5.36 \begin {gather*} \begin {cases} \frac {\tilde {\infty } x}{\tan {\left (c \right )}} & \text {for}\: a = 0 \wedge b = 0 \wedge d = 0 \\\frac {i d x \tan {\left (c + d x \right )}}{2 b d \tan {\left (c + d x \right )} - 2 i b d} + \frac {d x}{2 b d \tan {\left (c + d x \right )} - 2 i b d} + \frac {i}{2 b d \tan {\left (c + d x \right )} - 2 i b d} & \text {for}\: a = - i b \\- \frac {i d x \tan {\left (c + d x \right )}}{2 b d \tan {\left (c + d x \right )} + 2 i b d} + \frac {d x}{2 b d \tan {\left (c + d x \right )} + 2 i b d} - \frac {i}{2 b d \tan {\left (c + d x \right )} + 2 i b d} & \text {for}\: a = i b \\\frac {x}{a + b \tan {\left (c \right )}} & \text {for}\: d = 0 \\\frac {x}{a} & \text {for}\: b = 0 \\\frac {2 a d x}{2 a^{2} d + 2 b^{2} d} + \frac {2 b \log {\left (\frac {a}{b} + \tan {\left (c + d x \right )} \right )}}{2 a^{2} d + 2 b^{2} d} - \frac {b \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 a^{2} d + 2 b^{2} d} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.59, size = 74, normalized size = 1.64 \begin {gather*} \frac {\frac {2 \, b^{2} \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{a^{2} b + b^{3}} + \frac {2 \, {\left (d x + c\right )} a}{a^{2} + b^{2}} - \frac {b \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{a^{2} + b^{2}}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.18, size = 73, normalized size = 1.62 \begin {gather*} \frac {b\,\ln \left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}{d\,\left (a^2+b^2\right )}-\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )}{2\,d\,\left (b+a\,1{}\mathrm {i}\right )}-\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )-\mathrm {i}\right )\,1{}\mathrm {i}}{2\,d\,\left (a+b\,1{}\mathrm {i}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________